<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>

        .header{
            height:100px;
            background-color: gray;

        }
        .main{
            height: 2000px;
            background-color: pink;
        }
        .nav{
            position: sticky;
            top: 0;
            width: 1200px;
            height: 100px;
            background-color: orange;
            margin: 0 auto;
        }
        .footer{
            height: 1000px;
            background-color: #333;
        }
    </style>
</head>
<body>
    <div class="header">
        头部
    </div>
    <div class="main">
        <div class="nav">
            cijidaohang
        </div>
    </div>

    <div class="footer">


    </div>
</body>
</html>